<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="menu" tagdir="/WEB-INF/tags/menu" %>	
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<div id="menu">
    <menu:menu id="_menu" z="nZaf43BjUg1iM0v70HJVEsXDopc=">
        
        <menu:category id="c_product">
       		<c:forEach items="${productTypes }" var="o">
       			<menu:item url="/product?type=${o.id }" label="${o.name }" id="xx"/>
       		</c:forEach>
       	</menu:category>
       	
        <menu:category id="c_news" z="/GYP5OCuHDR51pEBl2hXSgh9Kzs=">
            <menu:item id="i_news_new" messageCode="global_menu_new" url="/news?form" z="KKGmhlBtoqXdUbIsLPG2pR5jcbw="/>
            <menu:item id="i_news_list" messageCode="global_menu_list" url="/news?page=1&amp;size=${empty param.size ? 10 : param.size}" z="Z3jXJYPsEw3tWVe0eJEvD8n+vQg="/>
        </menu:category>
        <menu:category id="c_information" z="Dj7TIdWbuduwiEHddZlWtY45LSw=">
            <menu:item id="i_information_new" messageCode="global_menu_new" url="/informations?form" z="UyVfjeStA1aKmkfcI7qcWpRLWLQ="/>
            <menu:item id="i_information_list" messageCode="global_menu_list" url="/informations?page=1&amp;size=${empty param.size ? 10 : param.size}" z="QGEcGfb2QECwGBvoCLE0t5WzD7M="/>
        </menu:category>
        <menu:category id="c_contact" z="Mum4Pow72SFjHtkf2OLMqQutcOg=">
            <sec:authorize ifAllGranted="ROLE_ROOT">
            	<menu:item id="i_contact_new" messageCode="global_menu_new" url="/contacts?form" z="lwRv41keqcpEkNgDi/vzZp8BfAw="/>
            </sec:authorize>
            <menu:item id="i_contact_list" messageCode="global_menu_list" url="/contacts?page=1&amp;size=${empty param.size ? 10 : param.size}" z="DYJuwxmLMZGoQddIUWlUOx4o5Qg="/>
        </menu:category>
        <menu:category id="c_about" z="fEflsXoxy/p5DAq5DZM3VZn4vW8=">
        	<sec:authorize ifAllGranted="ROLE_ROOT">
            	<menu:item id="i_about_new" messageCode="global_menu_new" url="/abouts?form" z="mLJ+WFzCQXS3OqrAzFYxk/myUcc="/>
            </sec:authorize>
            <menu:item id="i_about_list" messageCode="global_menu_list" url="/abouts?page=1&amp;size=${empty param.size ? 10 : param.size}" z="xgMhcFqnQlQK1yplrx4M4J88tY0="/>
        </menu:category>
        <menu:category id="c_service" z="3UA/yekc26BP3BWK8FEsrofMIbE=">
        	<sec:authorize ifAllGranted="ROLE_ROOT">
           		<menu:item id="i_service_new" messageCode="global_menu_new" url="/services?form" z="8z9X6KeQEB+r7FcJ3rgKRJ1p4d4="/>
           	</sec:authorize>
           	<menu:item id="i_service_list" messageCode="global_menu_list" url="/services?page=1&amp;size=${empty param.size ? 10 : param.size}" z="Wxlf7e/ytPbwfz87IeadIy7+ato="/>
       	</menu:category>
        
		<menu:category id="c_producttype" z="Q4DYXVx+vEvBAQ7/j1kQ8Kdz780=">
			<menu:item id="i_producttype_new" messageCode="global_menu_new" url="/producttypes?form" z="432aOaTLo3ZSnBcW6QyEXZT97i0="/>
			<menu:item id="i_producttype_list" messageCode="global_menu_list" url="/producttypes?page=1&amp;size=${empty param.size ? 10 : param.size}" z="Buyr7w99pffL/a/YP70G+lF5xzo="/>
		</menu:category>
		
        <sec:authorize ifAllGranted="ROLE_ADMIN">
        	<menu:category id="c_product" z="vJ6efqiSxFssuvqFTsXpvZ3AvA8=">
	            <menu:item id="i_product_new" messageCode="global_menu_new" url="/products?form" z="Ezf8cTW61d2RkMNEcYkDJpG01kc="/>
	            <menu:item id="i_product_list" messageCode="global_menu_list" url="/products?page=1&amp;size=${empty param.size ? 10 : param.size}" z="kEeyCmUUYXShbDEWwOLheaAkM50="/>
	        </menu:category>
        </sec:authorize>
        
        <!-- admin -->
        <sec:authorize ifAllGranted="ROLE_ADMIN">
	        
        </sec:authorize>
        
        <!-- root -->
        <sec:authorize ifAllGranted="ROLE_ROOT">
	        <menu:category id="c_click" z="FF67s4tBNHcVdlOOjKZ9D9UtC0Y=">
	            <menu:item id="i_click_new" messageCode="global_menu_new" url="/clicks?form" z="7U8YH3Xmo/zB4NrtEmTFyuoO4yc="/>
	            <menu:item id="i_click_list" messageCode="global_menu_list" url="/clicks?page=1&amp;size=${empty param.size ? 10 : param.size}" z="OrWfHomUyZBCt0NneRif2PSB0M0="/>
	        </menu:category>
        </sec:authorize>
        
    </menu:menu>
</div>
